/*
 * @Author: 260156 260156@gree.com.cn
 * @Date: 2022-08-10 15:27:45
 * @LastEditors: 260156 260156@gree.com.cn
 * @LastEditTime: 2022-08-11 11:28:41
 * @FilePath: \gree-zst-web\src\views\manage\organization\types.ts
 * @Description:
 *
 * Copyright (c) 2022 by 260156 260156@gree.com.cn, All Rights Reserved.
 */
import type { OrganizationId } from "api/manage/model/manage";

export interface TableItem {
  id: OrganizationId;
  name: string;
  children?: TableItem[] | [];
}

export type TableData = TableItem[] | [];

// id? name
export type EditForm = Pick<TableItem, "name"> & Partial<Pick<TableItem, "id">>;

// id name
export type UpdateParams = Omit<TableItem, "children">;

// parentId name
export type AddParams = Pick<TableItem, "name"> & {
  parentId: OrganizationId;
};
